﻿using System;
using System.Collections.Generic;
using System.IO;
using KKSG;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
using XUpdater;
using XUtliPoolLib;

namespace XMainClient.UI
{
	// Token: 0x0200180D RID: 6157
	internal class ScreenShotShareView : DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>
	{
		// Token: 0x170038F7 RID: 14583
		// (get) Token: 0x0600FF39 RID: 65337 RVA: 0x003C2F0C File Offset: 0x003C110C
		public override string fileName
		{
			get
			{
				return "Common/Share";
			}
		}

		// Token: 0x170038F8 RID: 14584
		// (get) Token: 0x0600FF3A RID: 65338 RVA: 0x003C2F24 File Offset: 0x003C1124
		public override int layer
		{
			get
			{
				return 1;
			}
		}

		// Token: 0x170038F9 RID: 14585
		// (get) Token: 0x0600FF3B RID: 65339 RVA: 0x003C2F38 File Offset: 0x003C1138
		public override bool autoload
		{
			get
			{
				return true;
			}
		}

		// Token: 0x170038FA RID: 14586
		// (get) Token: 0x0600FF3C RID: 65340 RVA: 0x003C2F4C File Offset: 0x003C114C
		public override bool hideMainMenu
		{
			get
			{
				return true;
			}
		}

		// Token: 0x170038FB RID: 14587
		// (get) Token: 0x0600FF3D RID: 65341 RVA: 0x003C2F60 File Offset: 0x003C1160
		public override int group
		{
			get
			{
				return 1;
			}
		}

		// Token: 0x0600FF3E RID: 65342 RVA: 0x003C2F74 File Offset: 0x003C1174
		protected override void Init()
		{
			this._doc = XDocuments.GetSpecificDocument<XScreenShotShareDocument>(XScreenShotShareDocument.uuID);
			this._doc.ScreenShotView = this;
			string value = XSingleton<XGlobalConfig>.singleton.GetValue("CameraValue");
			string[] array = value.Split(new char[]
			{
				'|'
			});
			this._min_dist = float.Parse(array[0]);
			this._max_dist = float.Parse(array[1]);
			this.fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_Share", base.uiBehaviour.mEffectParent, false);
			this.InitLeftMenu();
		}

		// Token: 0x0600FF3F RID: 65343 RVA: 0x003C3004 File Offset: 0x003C1204
		public override void RegisterEvent()
		{
			base.uiBehaviour.mQQBtn1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQShareSession));
			base.uiBehaviour.mQQBtn2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQShareQZone));
			base.uiBehaviour.mWeChatBtn1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeChatShareSession));
			base.uiBehaviour.mWeChatBtn2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeChatShareTimeLine));
			base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
			base.uiBehaviour.mDoScreenShot.RegisterClickEventHandler(new ButtonClickEventHandler(this.CaptureScreenShot));
			base.uiBehaviour.mReqShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReqShare));
			base.uiBehaviour.mSnapShotAgain.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReScreenShot));
			base.uiBehaviour.mQQBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
			base.uiBehaviour.mWeChatBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
			base.uiBehaviour.mSnapRoot.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnCharacterWindowDrag));
			base.uiBehaviour.mReqSave.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSavePic));
			base.uiBehaviour.mModeSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowMode));
			base.uiBehaviour.mDanceSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowAnim));
			base.uiBehaviour.mEffectsSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowFx));
			base.uiBehaviour.mEffectsMore.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowMoreFx));
			base.uiBehaviour.mUnlockBack.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHideUnlock));
			base.uiBehaviour.mZoomSlider.RegisterValueChangeEventHandler(new SliderValueChangeEventHandler(this.OnZoomSliderChanged));
			base.uiBehaviour.mModeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
			base.uiBehaviour.mDanceBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
			base.uiBehaviour.mEffectBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
			base.RegisterEvent();
		}

		// Token: 0x0600FF40 RID: 65344 RVA: 0x003C327C File Offset: 0x003C147C
		protected override void OnShow()
		{
			this.ShowCaptureFrame();
			SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
			if (sceneType != SceneType.SCENE_FAMILYGARDEN)
			{
				if (sceneType != SceneType.SCENE_WEDDING)
				{
					if (sceneType == SceneType.SCENE_LEISURE)
					{
						bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler != null;
						if (flag)
						{
							DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler.SetVisible(false);
						}
					}
				}
				else
				{
					bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler != null;
					if (flag2)
					{
						DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler.SetVisible(false);
					}
				}
			}
			else
			{
				bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler != null;
				if (flag3)
				{
					DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler.SetVisible(false);
				}
			}
			this.OnReqEffect();
			base.uiBehaviour.mDoScreenShot.SetAudioClip("Audio/UI/Cam_photo");
			base.uiBehaviour.mZoomSlider.Value = (XSingleton<XScene>.singleton.GameCamera.TargetOffset - this._min_dist) / (this._max_dist - this._min_dist);
			this.InitDance();
			XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.WeekShare;
		}

		// Token: 0x0600FF41 RID: 65345 RVA: 0x003C3384 File Offset: 0x003C1584
		protected override void OnHide()
		{
			bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsLoaded() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
			if (flag)
			{
				DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
			}
			SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
			if (sceneType != SceneType.SCENE_FAMILYGARDEN)
			{
				if (sceneType != SceneType.SCENE_WEDDING)
				{
					if (sceneType == SceneType.SCENE_LEISURE)
					{
						bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler != null;
						if (flag2)
						{
							DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler.SetVisible(true);
						}
					}
				}
				else
				{
					bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler != null;
					if (flag3)
					{
						DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler.SetVisible(true);
					}
				}
			}
			else
			{
				bool flag4 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler != null;
				if (flag4)
				{
					DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler.SetVisible(true);
				}
			}
			XSingleton<XTimerMgr>.singleton.KillTimer(this._dance_timer_token);
			this._dance_timer_token = 0U;
			XSingleton<XTimerMgr>.singleton.KillTimer(this._check_pic_token);
			this._check_pic_token = 0U;
			this.OnResetEntityRender();
			this.OnStopPlayingFX();
			for (int i = 0; i < this._mode_go.Count; i++)
			{
				GameObject gameObject = this._mode_go[i];
				IXUICheckBox ixuicheckBox = gameObject.transform.Find("option1/Normal").GetComponent("XUICheckBox") as IXUICheckBox;
				ixuicheckBox.bChecked = true;
			}
			for (int j = 0; j < this._mode_effectgo.Count; j++)
			{
				GameObject gameObject2 = this._mode_effectgo[j];
				IXUICheckBox ixuicheckBox2 = gameObject2.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
				ixuicheckBox2.bChecked = false;
			}
			XSingleton<XScene>.singleton.GameCamera.TargetOffset = XSingleton<XScene>.singleton.GameCamera.DefaultOffset;
			XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
			base.uiBehaviour.mCaptureTexture.SetRuntimeTex(null, true);
		}

		// Token: 0x0600FF42 RID: 65346 RVA: 0x003C3580 File Offset: 0x003C1780
		protected override void OnUnload()
		{
			bool flag = this.fx != null;
			if (flag)
			{
				XSingleton<XFxMgr>.singleton.DestroyFx(this.fx, true);
				this.fx = null;
			}
		}

		// Token: 0x0600FF43 RID: 65347 RVA: 0x003C35B6 File Offset: 0x003C17B6
		public override void StackRefresh()
		{
			base.StackRefresh();
			XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.mSnapShot);
		}

		// Token: 0x0600FF44 RID: 65348 RVA: 0x003C35D8 File Offset: 0x003C17D8
		public void ShowMainView()
		{
			base.uiBehaviour.mCharFrame.SetActive(false);
			base.uiBehaviour.mUnlockFrame.SetVisible(false);
			base.uiBehaviour.mModeSelect.SetVisible(false);
			base.uiBehaviour.mDanceSelect.SetVisible(false);
			base.uiBehaviour.mEffectsSelect.SetVisible(false);
		}

		// Token: 0x0600FF45 RID: 65349 RVA: 0x003C3640 File Offset: 0x003C1840
		public void ShowCharView()
		{
			base.uiBehaviour.mCharFrame.SetActive(true);
			base.uiBehaviour.mUnlockFrame.SetVisible(false);
			base.uiBehaviour.mModeSelect.SetVisible(false);
			base.uiBehaviour.mDanceSelect.SetVisible(false);
			base.uiBehaviour.mEffectsSelect.SetVisible(false);
			XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.mSnapShot);
		}

		// Token: 0x0600FF46 RID: 65350 RVA: 0x003C36C0 File Offset: 0x003C18C0
		private void ShowCaptureFrame()
		{
			base.uiBehaviour.mCaptureTexture.SetRuntimeTex(null, true);
			base.uiBehaviour.mDoScreenShot.SetVisible(true);
			base.uiBehaviour.mKacha.SetVisible(false);
			base.uiBehaviour.mShareFrame.SetActive(false);
			base.uiBehaviour.mClose.SetVisible(true);
			base.uiBehaviour.mScaleDoing.SetActive(true);
			base.uiBehaviour.mLogo.SetActive(false);
			XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
			base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 0f);
		}

		// Token: 0x0600FF47 RID: 65351 RVA: 0x003C37B0 File Offset: 0x003C19B0
		public void IOS3DTouchScreenShot()
		{
			base.uiBehaviour.mDoScreenShot.SetVisible(false);
			base.uiBehaviour.mClose.SetVisible(false);
			base.uiBehaviour.mScaleDoing.SetActive(false);
			base.uiBehaviour.mModeSp.SetVisible(false);
			base.uiBehaviour.mDanceSp.SetVisible(false);
			base.uiBehaviour.mEffectsSp.SetVisible(false);
			base.uiBehaviour.mZoom.SetActive(false);
			base.uiBehaviour.mZoom.SetActive(true);
			base.uiBehaviour.mLogo.SetActive(true);
			bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
			if (flag)
			{
				base.uiBehaviour.mLogoQQ.SetActive(true);
				base.uiBehaviour.mLogoWC.SetActive(false);
			}
			else
			{
				base.uiBehaviour.mLogoQQ.SetActive(false);
				base.uiBehaviour.mLogoWC.SetActive(true);
			}
			base.uiBehaviour.mPlayerName.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
			base.uiBehaviour.mServerName.SetText(XSingleton<XClientNetwork>.singleton.Server);
			DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
			XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(XSingleton<XScreenShotMgr>.singleton.CaptureScreenshot), null);
			XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.PlayScreenFx), null);
		}

		// Token: 0x0600FF48 RID: 65352 RVA: 0x003C3944 File Offset: 0x003C1B44
		public bool CaptureScreenShot(IXUIButton btn)
		{
			base.uiBehaviour.mDoScreenShot.SetVisible(false);
			base.uiBehaviour.mClose.SetVisible(false);
			base.uiBehaviour.mScaleDoing.SetActive(false);
			base.uiBehaviour.mModeSp.SetVisible(false);
			base.uiBehaviour.mDanceSp.SetVisible(false);
			base.uiBehaviour.mEffectsSp.SetVisible(false);
			base.uiBehaviour.mZoom.SetActive(false);
			base.uiBehaviour.mLogo.SetActive(true);
			bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
			if (flag)
			{
				base.uiBehaviour.mLogoQQ.SetActive(true);
				base.uiBehaviour.mLogoWC.SetActive(false);
			}
			else
			{
				base.uiBehaviour.mLogoQQ.SetActive(false);
				base.uiBehaviour.mLogoWC.SetActive(true);
			}
			base.uiBehaviour.mPlayerName.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
			base.uiBehaviour.mServerName.SetText(XSingleton<XClientNetwork>.singleton.Server);
			DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
			XSingleton<XScreenShotMgr>.singleton.CaptureScreenshot(null);
			XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.PlayScreenFx), null);
			return true;
		}

		// Token: 0x0600FF49 RID: 65353 RVA: 0x003C3AB8 File Offset: 0x003C1CB8
		public bool ReqShare(IXUIButton btn)
		{
			bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
			if (flag)
			{
				bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("QQ_Installed", "");
				bool flag3 = !flag2;
				if (flag3)
				{
					XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_QQ_NOT_INSTALLED"), "fece00");
					return false;
				}
				base.uiBehaviour.mQQFrame.SetVisible(true);
				base.uiBehaviour.mWeChatFrame.SetVisible(false);
				base.uiBehaviour.mQQPlayTween.SetTweenGroup(0);
				base.uiBehaviour.mQQPlayTween.ResetTweenByGroup(true, 0);
				base.uiBehaviour.mQQPlayTween.PlayTween(true, -1f);
			}
			else
			{
				bool flag4 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat;
				if (flag4)
				{
					bool flag5 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", "");
					bool flag6 = !flag5;
					if (flag6)
					{
						XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_WECHAT_NOT_INSTALLED"), "fece00");
						return false;
					}
					base.uiBehaviour.mQQFrame.SetVisible(false);
					base.uiBehaviour.mWeChatFrame.SetVisible(true);
					base.uiBehaviour.mWCPlayTween.SetTweenGroup(0);
					base.uiBehaviour.mWCPlayTween.ResetTweenByGroup(true, 0);
					base.uiBehaviour.mWCPlayTween.PlayTween(true, -1f);
				}
			}
			return true;
		}

		// Token: 0x0600FF4A RID: 65354 RVA: 0x003C3C54 File Offset: 0x003C1E54
		public bool ReScreenShot(IXUIButton btn)
		{
			this.ShowCaptureFrame();
			return true;
		}

		// Token: 0x0600FF4B RID: 65355 RVA: 0x003C3C70 File Offset: 0x003C1E70
		private void PlayScreenFx(object obj)
		{
			base.uiBehaviour.mKacha.SetVisible(true);
			base.uiBehaviour.mPlayTween.SetTweenGroup(0);
			base.uiBehaviour.mPlayTween.ResetTweenByGroup(true, 0);
			base.uiBehaviour.mPlayTween.PlayTween(true, -1f);
			XSingleton<XTimerMgr>.singleton.SetTimer(0.4f, new XTimerMgr.ElapsedEventHandler(this.ShowShare), null);
			base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 1000f);
			this._share_count = 0;
		}

		// Token: 0x0600FF4C RID: 65356 RVA: 0x003C3D44 File Offset: 0x003C1F44
		private void ShowShare(object obj)
		{
			bool flag = !base.IsVisible();
			if (!flag)
			{
				bool flag2 = !File.Exists(XSingleton<XScreenShotMgr>.singleton.FilePath);
				if (flag2)
				{
					base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 0f);
					this._share_count++;
					bool flag3 = this._share_count > 30;
					if (flag3)
					{
						XSingleton<UiUtility>.singleton.ShowSystemTip("Failed", "fece00");
					}
					else
					{
						XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(this.ShowShare), null);
					}
				}
				else
				{
					base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 1000f);
					base.uiBehaviour.mShareFrame.SetActive(true);
					base.uiBehaviour.mDoScreenShot.SetVisible(false);
					base.uiBehaviour.mQQFrame.SetVisible(false);
					base.uiBehaviour.mWeChatFrame.SetVisible(false);
					base.uiBehaviour.mModeSp.SetVisible(true);
					base.uiBehaviour.mDanceSp.SetVisible(true);
					base.uiBehaviour.mEffectsSp.SetVisible(true);
					base.uiBehaviour.mZoom.SetActive(true);
					base.uiBehaviour.mLogo.SetActive(false);
					bool visible = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Photo_Share);
					base.uiBehaviour.mReqShareBtn.SetVisible(visible);
					DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(true);
					this.OnStopPlayingFX();
					XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, true);
					base.uiBehaviour.mPicFramePlayTween.SetTweenGroup(0);
					base.uiBehaviour.mPicFramePlayTween.ResetTweenByGroup(true, 0);
					base.uiBehaviour.mPicFramePlayTween.PlayTween(true, -1f);
					XSingleton<XDebug>.singleton.AddLog("The screen file path: ", XSingleton<XScreenShotMgr>.singleton.FilePath, null, null, null, null, XDebugColor.XDebug_None);
					XSingleton<XDebug>.singleton.AddLog("File exist: ", File.Exists(XSingleton<XScreenShotMgr>.singleton.FilePath).ToString(), null, null, null, null, XDebugColor.XDebug_None);
					RuntimePlatform platform = Application.platform;
					if (platform != (RuntimePlatform)8 && platform != (RuntimePlatform)11)
					{
						byte[] array = File.ReadAllBytes(XSingleton<XScreenShotMgr>.singleton.FilePath);
						bool flag4 = array != null;
						if (flag4)
						{
							Texture2D texture2D = new Texture2D(2, 2);
							texture2D.LoadImage(array);
							base.uiBehaviour.mCaptureTexture.SetRuntimeTex(texture2D, true);
						}
					}
					else
					{
						byte[] array2 = File.ReadAllBytes(XSingleton<XScreenShotMgr>.singleton.FilePath);
						Texture2D texture2D2 = new Texture2D(2, 2);
						bool flag5 = texture2D2.LoadImage(array2);
						bool flag6 = flag5;
						if (flag6)
						{
							base.uiBehaviour.mCaptureTexture.SetRuntimeTex(texture2D2, true);
							int width = texture2D2.width;
							int height = texture2D2.height;
							bool flag7 = width <= 600;
							if (flag7)
							{
								this.ShowCaptureFrame();
							}
						}
						else
						{
							bool flag8 = !flag5;
							if (flag8)
							{
								this.ShowCaptureFrame();
							}
						}
					}
				}
			}
		}

		// Token: 0x0600FF4D RID: 65357 RVA: 0x003C40D4 File Offset: 0x003C22D4
		public bool OnQQShareSession(IXUIButton btn)
		{
			XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
			XSingleton<XScreenShotMgr>.singleton.ShareScreen(true);
			return true;
		}

		// Token: 0x0600FF4E RID: 65358 RVA: 0x003C4100 File Offset: 0x003C2300
		public bool OnQQShareQZone(IXUIButton btn)
		{
			XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
			XSingleton<XScreenShotMgr>.singleton.ShareScreen(false);
			return true;
		}

		// Token: 0x0600FF4F RID: 65359 RVA: 0x003C412C File Offset: 0x003C232C
		public bool OnWeChatShareSession(IXUIButton btn)
		{
			XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
			XSingleton<XScreenShotMgr>.singleton.ShareScreen(true);
			return true;
		}

		// Token: 0x0600FF50 RID: 65360 RVA: 0x003C4158 File Offset: 0x003C2358
		public bool OnWeChatShareTimeLine(IXUIButton btn)
		{
			XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
			XSingleton<XScreenShotMgr>.singleton.ShareScreen(false);
			return true;
		}

		// Token: 0x0600FF51 RID: 65361 RVA: 0x003C4184 File Offset: 0x003C2384
		public bool OnClose(IXUIButton btn)
		{
			this.SetVisible(false, true);
			return true;
		}

		// Token: 0x0600FF52 RID: 65362 RVA: 0x003C41A0 File Offset: 0x003C23A0
		public void OnCloseShare(IXUISprite sp)
		{
			base.uiBehaviour.mQQFrame.SetVisible(false);
			base.uiBehaviour.mWeChatFrame.SetVisible(false);
		}

		// Token: 0x0600FF53 RID: 65363 RVA: 0x003C41C8 File Offset: 0x003C23C8
		private bool OnDance(IXUIButton btn)
		{
			float num = XSingleton<X3DAvatarMgr>.singleton.SetMainAnimationGetLength(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Dance);
			XSingleton<XTimerMgr>.singleton.KillTimer(this._dance_timer_token);
			int @int = XSingleton<XGlobalConfig>.singleton.GetInt("DanceLoopCount");
			this._dance_timer_token = XSingleton<XTimerMgr>.singleton.SetTimer(num * (float)@int, new XTimerMgr.ElapsedEventHandler(this.OnFinishDance), null);
			return true;
		}

		// Token: 0x0600FF54 RID: 65364 RVA: 0x003C4241 File Offset: 0x003C2441
		private void OnFinishDance(object obj)
		{
			XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Idle);
		}

		// Token: 0x0600FF55 RID: 65365 RVA: 0x003C4268 File Offset: 0x003C2468
		protected bool OnCharacterWindowDrag(Vector2 delta)
		{
			XSingleton<X3DAvatarMgr>.singleton.RotateMain(-delta.x / 2f);
			return true;
		}

		// Token: 0x0600FF56 RID: 65366 RVA: 0x003C4294 File Offset: 0x003C2494
		private void OnShowMode(IXUISprite sp)
		{
			bool flag = base.uiBehaviour.mModeSelect.IsVisible();
			if (flag)
			{
				base.uiBehaviour.mModeSelect.SetVisible(false);
			}
			else
			{
				base.uiBehaviour.mModeSelect.SetVisible(true);
			}
			base.uiBehaviour.mDanceSelect.SetVisible(false);
			base.uiBehaviour.mEffectsSelect.SetVisible(false);
		}

		// Token: 0x0600FF57 RID: 65367 RVA: 0x003C4300 File Offset: 0x003C2500
		private void OnShowAnim(IXUISprite sp)
		{
			bool flag = this._dance_num == 0;
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_NO_DANCE_ANIM"), "fece00");
			}
			else
			{
				base.uiBehaviour.mModeSelect.SetVisible(false);
				bool flag2 = base.uiBehaviour.mDanceSelect.IsVisible();
				if (flag2)
				{
					base.uiBehaviour.mDanceSelect.SetVisible(false);
				}
				else
				{
					base.uiBehaviour.mDanceSelect.SetVisible(true);
				}
				base.uiBehaviour.mEffectsSelect.SetVisible(false);
			}
		}

		// Token: 0x0600FF58 RID: 65368 RVA: 0x003C439C File Offset: 0x003C259C
		private void OnShowFx(IXUISprite sp)
		{
			base.uiBehaviour.mModeSelect.SetVisible(false);
			base.uiBehaviour.mDanceSelect.SetVisible(false);
			bool flag = base.uiBehaviour.mEffectsSelect.IsVisible();
			if (flag)
			{
				base.uiBehaviour.mEffectsSelect.SetVisible(false);
			}
			else
			{
				base.uiBehaviour.mEffectsSelect.SetVisible(true);
			}
		}

		// Token: 0x0600FF59 RID: 65369 RVA: 0x003C4408 File Offset: 0x003C2608
		private void OnShowMoreFx(IXUISprite sp)
		{
			base.uiBehaviour.mEffectsSelect.SetVisible(false);
			bool flag = base.uiBehaviour.mUnlockFrame.IsVisible();
			if (!flag)
			{
				int num = this.OnShowMoreFxFrame();
				bool flag2 = num > 0;
				if (flag2)
				{
					base.uiBehaviour.mUnlockFrame.SetVisible(true);
				}
				else
				{
					XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_NO_MORE_EFFECTS"), "fece00");
				}
			}
		}

		// Token: 0x0600FF5A RID: 65370 RVA: 0x003C4484 File Offset: 0x003C2684
		private int OnShowMoreFxFrame()
		{
			this.OnStopPlayingFX();
			base.uiBehaviour.mEffectListPool.ReturnAll(false);
			uint num = 0U;
			int num2 = 0;
			for (int i = 0; i < this._doc.EffectAllListId.Count; i++)
			{
				bool flag = this._doc.EffectListId.Contains(this._doc.EffectAllListId[i]);
				if (!flag)
				{
					bool flag2 = num == 0U;
					if (flag2)
					{
						num = this._doc.EffectAllListId[i];
					}
					List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(this._doc.EffectAllListId[i]);
					GameObject gameObject = base.uiBehaviour.mEffectListPool.FetchGameObject(false);
					gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mEffectListPool.TplPos.x, base.uiBehaviour.mEffectListPool.TplPos.y - (float)(num2 * base.uiBehaviour.mEffectListPool.TplHeight), base.uiBehaviour.mEffectListPool.TplPos.z);
					IXUILabel ixuilabel = gameObject.transform.Find("t").GetComponent("XUILabel") as IXUILabel;
					ixuilabel.SetText(rowDataById[0].EffectName);
					IXUILabel ixuilabel2 = gameObject.transform.Find("t2").GetComponent("XUILabel") as IXUILabel;
					ixuilabel2.SetText(rowDataById[0].EffectName);
					IXUICheckBox ixuicheckBox = gameObject.transform.GetComponent("XUICheckBox") as IXUICheckBox;
					ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectEffect));
					ixuicheckBox.ID = (ulong)this._doc.EffectAllListId[i];
					bool flag3 = num2 == 0;
					if (flag3)
					{
						ixuicheckBox.bChecked = true;
						this.OnSetEffect((int)this._doc.EffectAllListId[i]);
					}
					else
					{
						ixuicheckBox.bChecked = false;
					}
					num2++;
				}
			}
			this.OnInitUnlockInfo(num);
			return num2;
		}

		// Token: 0x0600FF5B RID: 65371 RVA: 0x003C46B4 File Offset: 0x003C28B4
		private void OnInitUnlockInfo(uint index)
		{
			List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(index);
			base.uiBehaviour.mConditionPool.ReturnAll(false);
			for (int i = 0; i < rowDataById.Count; i++)
			{
				bool flag = false;
				GameObject gameObject = base.uiBehaviour.mConditionPool.FetchGameObject(false);
				gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mConditionPool.TplPos.x, base.uiBehaviour.mConditionPool.TplPos.y - (float)(i * base.uiBehaviour.mConditionPool.TplHeight), base.uiBehaviour.mConditionPool.TplPos.z);
				IXUILabel ixuilabel = gameObject.transform.Find("condition1").GetComponent("XUILabel") as IXUILabel;
				IXUILabel ixuilabel2 = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
				IXUISprite ixuisprite = gameObject.transform.Find("ok").GetComponent("XUISprite") as IXUISprite;
				uint num = rowDataById[i].Condition[0, 0];
				uint num2 = rowDataById[i].Condition[0, 1];
				switch (num)
				{
				case 1U:
				{
					bool flag2 = this._doc.CharmVal >= num2;
					if (flag2)
					{
						flag = true;
					}
					break;
				}
				case 2U:
				{
					uint level = XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Level;
					bool flag3 = level >= num2;
					if (flag3)
					{
						flag = true;
					}
					break;
				}
				case 3U:
				{
					XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
					bool flag4 = specificDocument.TotalPay >= num2;
					if (flag4)
					{
						flag = true;
					}
					break;
				}
				case 4U:
				{
					XWelfareDocument specificDocument2 = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
					bool flag5 = specificDocument2.IsOwnMemberPrivilege((MemberPrivilege)num2);
					if (flag5)
					{
						flag = true;
					}
					break;
				}
				}
				ixuilabel.SetText(rowDataById[i].ConditionDesc);
				ixuilabel2.SetText(rowDataById[i].desc);
				ixuilabel2.ID = (ulong)rowDataById[i].SystemID;
				ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnEnterSystemUnlock));
				bool flag6 = flag;
				if (flag6)
				{
					ixuisprite.SetVisible(true);
					ixuilabel2.SetVisible(false);
				}
				else
				{
					ixuisprite.SetVisible(false);
					ixuilabel2.SetVisible(true);
				}
			}
		}

		// Token: 0x0600FF5C RID: 65372 RVA: 0x003C4938 File Offset: 0x003C2B38
		private void OnStopPlayingFX()
		{
			bool flag = this._playing_fx != null;
			if (flag)
			{
				XSingleton<XFxMgr>.singleton.DestroyFx(this._playing_fx, true);
			}
			this._playing_fx = null;
		}

		// Token: 0x0600FF5D RID: 65373 RVA: 0x003C496C File Offset: 0x003C2B6C
		private void OnEnterSystemUnlock(IXUILabel lb)
		{
			this.SetVisible(false, true);
			XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)lb.ID, 0UL);
		}

		// Token: 0x0600FF5E RID: 65374 RVA: 0x003C498C File Offset: 0x003C2B8C
		private void OnHideUnlock(IXUISprite sp)
		{
			base.uiBehaviour.mUnlockFrame.SetVisible(false);
			this.OnStopPlayingFX();
		}

		// Token: 0x0600FF5F RID: 65375 RVA: 0x003C49A8 File Offset: 0x003C2BA8
		public bool OnModeChanged(IXUICheckBox box)
		{
			bool flag = !box.bChecked;
			if (flag)
			{
				bool flag2 = this._check_index.Contains((uint)box.ID);
				if (flag2)
				{
					this._check_index.Remove((uint)box.ID);
				}
			}
			else
			{
				bool flag3 = !this._check_index.Contains((uint)box.ID);
				if (flag3)
				{
					this._check_index.Add((uint)box.ID);
				}
			}
			this.OnRefreshPlayerRender();
			return true;
		}

		// Token: 0x0600FF60 RID: 65376 RVA: 0x003C4A2C File Offset: 0x003C2C2C
		public bool OnAnimChanged(IXUICheckBox box)
		{
			bool flag = !box.bChecked;
			bool result;
			if (flag)
			{
				result = false;
			}
			else
			{
				XDanceDocument.Doc.ReqStartJustDance((uint)box.ID);
				result = true;
			}
			return result;
		}

		// Token: 0x0600FF61 RID: 65377 RVA: 0x003C4A64 File Offset: 0x003C2C64
		public bool OnEffectChanged(IXUICheckBox box)
		{
			this.OnStopPlayingFX();
			bool flag = !box.bChecked;
			bool result;
			if (flag)
			{
				result = false;
			}
			else
			{
				Transform transform = XSingleton<UIManager>.singleton.UIRoot.Find("Camera").transform;
				List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById((uint)box.ID);
				this._playing_fx = XSingleton<XFxMgr>.singleton.CreateAndPlay(rowDataById[0].EffectRoute, transform, Vector3.zero, Vector3.one, 1f, true, 3600f, true);
				result = true;
			}
			return result;
		}

		// Token: 0x0600FF62 RID: 65378 RVA: 0x003C4AF0 File Offset: 0x003C2CF0
		private void OnSetEffect(int index)
		{
			this.OnInitUnlockInfo((uint)index);
			this.OnStopPlayingFX();
			List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById((uint)index);
			this._playing_fx = XSingleton<XFxMgr>.singleton.CreateUIFx(rowDataById[0].EffectRoute, base.uiBehaviour.mUnlockEffectWindow.transform, new Vector3(0.25f, 0.25f, 0.25f), false);
		}

		// Token: 0x0600FF63 RID: 65379 RVA: 0x003C4B5C File Offset: 0x003C2D5C
		public bool OnSelectEffect(IXUICheckBox box)
		{
			bool flag = !box.bChecked;
			bool result;
			if (flag)
			{
				result = false;
			}
			else
			{
				this.OnSetEffect((int)box.ID);
				result = true;
			}
			return result;
		}

		// Token: 0x0600FF64 RID: 65380 RVA: 0x003C4B90 File Offset: 0x003C2D90
		public bool OnSavePic(IXUIButton btn)
		{
			bool flag = this._saved_file_path == XSingleton<XScreenShotMgr>.singleton.FilePath;
			bool result;
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMERA_SAVED_ERR"), "fece00");
				result = false;
			}
			else
			{
				RuntimePlatform platform = Application.platform;
				if (platform != (RuntimePlatform)8)
				{
					if (platform == (RuntimePlatform)11)
					{
						string text = "/../../../../DCIM/Camera";
						text = Application.persistentDataPath + text;
						bool flag2 = !Directory.Exists(text);
						if (flag2)
						{
							Directory.CreateDirectory(text);
						}
						string destFileName = text + "/" + XSingleton<XScreenShotMgr>.singleton.FileName;
						File.Copy(XSingleton<XScreenShotMgr>.singleton.FilePath, destFileName);
						XSingleton<XScreenShotMgr>.singleton.RefreshPhotoView(text);
					}
				}
				else
				{
					this._saved_file_path = XSingleton<XScreenShotMgr>.singleton.FilePath;
					XSingleton<XScreenShotMgr>.singleton.SaveScreenshotPic(this._saved_file_path);
				}
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMERA_SAVED"), "fece00");
				this._saved_file_path = XSingleton<XScreenShotMgr>.singleton.FilePath;
				result = true;
			}
			return result;
		}

		// Token: 0x0600FF65 RID: 65381 RVA: 0x000FEEFC File Offset: 0x000FD0FC
		public void OnAnimStart(IXUISprite sp)
		{
		}

		// Token: 0x0600FF66 RID: 65382 RVA: 0x003C4CB0 File Offset: 0x003C2EB0
		public void OnClickBg(IXUISprite sp)
		{
			bool flag = sp.ID == 1UL;
			if (flag)
			{
				base.uiBehaviour.mModeSelect.SetVisible(false);
			}
			else
			{
				bool flag2 = sp.ID == 2UL;
				if (flag2)
				{
					base.uiBehaviour.mDanceSelect.SetVisible(false);
				}
				else
				{
					bool flag3 = sp.ID == 3UL;
					if (flag3)
					{
						base.uiBehaviour.mEffectsSelect.SetVisible(false);
					}
				}
			}
		}

		// Token: 0x0600FF67 RID: 65383 RVA: 0x003C4D24 File Offset: 0x003C2F24
		public bool OnZoomSliderChanged(float val)
		{
			XSingleton<XScene>.singleton.GameCamera.TargetOffset = this._min_dist + (this._max_dist - this._min_dist) * val;
			return true;
		}

		// Token: 0x0600FF68 RID: 65384 RVA: 0x003C4D60 File Offset: 0x003C2F60
		public bool CanRenderOtherPalyers()
		{
			bool flag = !base.IsLoaded() || !base.IsVisible();
			return flag || this._check_index.Contains(1U);
		}

		// Token: 0x0600FF69 RID: 65385 RVA: 0x003C4D9C File Offset: 0x003C2F9C
		private void OnRefreshPlayerRender()
		{
			bool flag = this._check_index.Contains(0U);
			bool flag2 = XSingleton<XEntityMgr>.singleton.Player != null;
			if (flag2)
			{
				XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XPlayer.PlayerLayer, flag);
				XSingleton<XCustomShadowMgr>.singleton.SetCullLayer(flag);
				XBillboardShowCtrlEventArgs @event = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
				@event.show = flag;
				@event.Firer = XSingleton<XEntityMgr>.singleton.Player;
				@event.type = BillBoardHideType.Photo;
				XSingleton<XEventMgr>.singleton.FireEvent(@event);
			}
			bool flag3 = this._check_index.Contains(2U);
			XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XNpc.NpcLayer, flag3);
			List<uint> npcs = XSingleton<XEntityMgr>.singleton.GetNpcs(XSingleton<XScene>.singleton.SceneID);
			bool flag4 = npcs != null;
			if (flag4)
			{
				for (int i = 0; i < npcs.Count; i++)
				{
					XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(npcs[i]);
					bool flag5 = npc != null;
					if (flag5)
					{
						XBillboardShowCtrlEventArgs event2 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
						event2.show = flag3;
						event2.Firer = npc;
						event2.type = BillBoardHideType.Photo;
						XSingleton<XEventMgr>.singleton.FireEvent(event2);
					}
				}
			}
			bool flag6 = this._check_index.Contains(1U);
			XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XRole.RoleLayer, flag6);
			List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(XSingleton<XEntityMgr>.singleton.Player);
			bool flag7 = ally != null;
			if (flag7)
			{
				for (int j = 0; j < ally.Count; j++)
				{
					bool flag8 = ally[j] != null;
					if (flag8)
					{
						bool flag9 = ally[j].IsRole && !ally[j].IsPlayer;
						if (flag9)
						{
							XBillboardShowCtrlEventArgs event3 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
							event3.show = flag6;
							event3.Firer = ally[j];
							event3.type = BillBoardHideType.Photo;
							XSingleton<XEventMgr>.singleton.FireEvent(event3);
						}
					}
				}
			}
		}

		// Token: 0x0600FF6A RID: 65386 RVA: 0x003C4FB4 File Offset: 0x003C31B4
		private void OnResetEntityRender()
		{
			XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XPlayer.PlayerLayer, true);
			XBillboardShowCtrlEventArgs @event = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
			@event.show = true;
			@event.type = BillBoardHideType.Photo;
			@event.Firer = XSingleton<XEntityMgr>.singleton.Player;
			XSingleton<XEventMgr>.singleton.FireEvent(@event);
			XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XNpc.NpcLayer, true);
			List<uint> npcs = XSingleton<XEntityMgr>.singleton.GetNpcs(XSingleton<XScene>.singleton.SceneID);
			bool flag = npcs != null;
			if (flag)
			{
				for (int i = 0; i < npcs.Count; i++)
				{
					XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(npcs[i]);
					bool flag2 = npc != null;
					if (flag2)
					{
						XBillboardShowCtrlEventArgs event2 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
						event2.show = true;
						event2.Firer = npc;
						event2.type = BillBoardHideType.Photo;
						XSingleton<XEventMgr>.singleton.FireEvent(event2);
					}
				}
			}
			XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XRole.RoleLayer, true);
			List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(XSingleton<XEntityMgr>.singleton.Player);
			for (int j = 0; j < ally.Count; j++)
			{
				bool flag3 = ally[j].IsRole && !ally[j].IsPlayer;
				if (flag3)
				{
					XBillboardShowCtrlEventArgs event3 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
					event3.show = true;
					event3.Firer = ally[j];
					event3.type = BillBoardHideType.Photo;
					XSingleton<XEventMgr>.singleton.FireEvent(event3);
				}
			}
		}

		// Token: 0x0600FF6B RID: 65387 RVA: 0x003C5150 File Offset: 0x003C3350
		private void OnReqEffect()
		{
			RpcC2G_PhotographEffect rpc = new RpcC2G_PhotographEffect();
			XSingleton<XClientNetwork>.singleton.Send(rpc);
		}

		// Token: 0x0600FF6C RID: 65388 RVA: 0x003C5170 File Offset: 0x003C3370
		public void OnRefreshEffects()
		{
			base.uiBehaviour.mEffectPool.ReturnAll(false);
			this._mode_effectgo.Clear();
			base.uiBehaviour.mEffectsBack.spriteHeight = base.uiBehaviour.mEffectPool.TplHeight * this._doc.EffectListId.Count + 60;
			int num = (this._doc.EffectListId.Count % 2 == 0) ? (base.uiBehaviour.mEffectPool.TplHeight / 2) : 0;
			for (int i = 0; i < this._doc.EffectListId.Count; i++)
			{
				List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(this._doc.EffectListId[i]);
				int num2 = (i % 2 == 0) ? 1 : -1;
				GameObject gameObject = base.uiBehaviour.mEffectPool.FetchGameObject(false);
				this._mode_effectgo.Add(gameObject);
				gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mEffectPool.TplPos.x, base.uiBehaviour.mEffectPool.TplPos.y + (float)(num2 * ((i + 1) / 2) * base.uiBehaviour.mEffectPool.TplHeight) + (float)num, base.uiBehaviour.mEffectPool.TplPos.z);
				IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
				ixuilabel.SetText(rowDataById[0].EffectName);
				IXUICheckBox ixuicheckBox = gameObject.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
				ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnEffectChanged));
				ixuicheckBox.ID = (ulong)this._doc.EffectListId[i];
				ixuicheckBox.bChecked = false;
			}
			base.uiBehaviour.mEffectsMore.transform.localPosition = new Vector3(base.uiBehaviour.mEffectsMore.transform.localPosition.x, base.uiBehaviour.mEffectPool.TplPos.y - (float)((this._doc.EffectListId.Count + 1) * base.uiBehaviour.mEffectPool.TplHeight / 2), base.uiBehaviour.mEffectsMore.transform.localPosition.z);
			bool flag = this._doc.EffectAllListId.Count == this._doc.EffectListId.Count;
			if (flag)
			{
				base.uiBehaviour.mEffectsRedpoint.SetVisible(false);
			}
			else
			{
				base.uiBehaviour.mEffectsRedpoint.SetVisible(true);
			}
		}

		// Token: 0x0600FF6D RID: 65389 RVA: 0x003C5444 File Offset: 0x003C3644
		private void InitLeftMenu()
		{
			base.uiBehaviour.mModePool.ReturnAll(false);
			string value = XSingleton<XGlobalConfig>.singleton.GetValue("PhotoShowName");
			string[] array = value.Split(new char[]
			{
				'|'
			});
			this._mode_go.Clear();
			base.uiBehaviour.mModeBack.spriteHeight = base.uiBehaviour.mModePool.TplHeight * array.Length;
			for (int i = 0; i < array.Length; i++)
			{
				GameObject gameObject = base.uiBehaviour.mModePool.FetchGameObject(false);
				int num = (i % 2 == 0) ? 1 : -1;
				int num2 = base.uiBehaviour.mModePool.TplHeight / 2;
				gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mModePool.TplPos.x, base.uiBehaviour.mModePool.TplPos.y + (float)(num * ((i + 1) / 2) * base.uiBehaviour.mModePool.TplHeight), base.uiBehaviour.mModePool.TplPos.z);
				IXUILabel ixuilabel = gameObject.transform.Find("option1/Name").GetComponent("XUILabel") as IXUILabel;
				ixuilabel.SetText(array[i]);
				IXUICheckBox ixuicheckBox = gameObject.transform.Find("option1/Normal").GetComponent("XUICheckBox") as IXUICheckBox;
				ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnModeChanged));
				ixuicheckBox.ID = (ulong)((long)i);
				ixuicheckBox.bChecked = true;
				this._check_index.Add((uint)i);
				this._mode_go.Add(gameObject);
			}
			this.OnRefreshEffects();
		}

		// Token: 0x0600FF6E RID: 65390 RVA: 0x003C5604 File Offset: 0x003C3804
		private void InitDance()
		{
			base.uiBehaviour.mDancePool.FakeReturnAll();
			this._dance_num = 0;
			int num = 0;
			for (int i = 0; i < XDanceDocument.Doc.SelfConfigData.Count; i++)
			{
				DanceConfig.RowData danceConfig = XDanceDocument.GetDanceConfig(XDanceDocument.Doc.SelfConfigData[i].motionID);
				bool flag = danceConfig != null && XDanceDocument.Doc.IsUnlock(XDanceDocument.Doc.SelfConfigData[i].valid, danceConfig.Condition);
				if (flag)
				{
					this._dance_num++;
				}
			}
			float num2 = (this._dance_num > 8) ? 8.5f : ((float)this._dance_num);
			base.uiBehaviour.mDanceBack.spriteHeight = (int)((float)base.uiBehaviour.mModePool.TplHeight * num2) + 30;
			base.uiBehaviour.mDanceBackSV.SetSize((float)base.uiBehaviour.mDanceBack.spriteWidth, (float)base.uiBehaviour.mModePool.TplHeight * num2);
			for (int j = 0; j < XDanceDocument.Doc.SelfConfigData.Count; j++)
			{
				DanceConfig.RowData danceConfig2 = XDanceDocument.GetDanceConfig(XDanceDocument.Doc.SelfConfigData[j].motionID);
				bool flag2 = danceConfig2 != null && XDanceDocument.Doc.IsUnlock(XDanceDocument.Doc.SelfConfigData[j].valid, danceConfig2.Condition);
				if (flag2)
				{
					GameObject gameObject = base.uiBehaviour.mDancePool.FetchGameObject(false);
					gameObject.transform.parent = base.uiBehaviour.mDanceBackList.gameObject.transform;
					IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
					ixuilabel.SetText(danceConfig2.MotionName);
					IXUICheckBox ixuicheckBox = gameObject.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
					ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnAnimChanged));
					ixuicheckBox.ID = (ulong)danceConfig2.MotionID;
					num++;
				}
			}
			base.uiBehaviour.mDancePool.ActualReturnAll(false);
			base.uiBehaviour.mDanceBackList.Refresh();
		}

		// Token: 0x0600FF6F RID: 65391 RVA: 0x003C5874 File Offset: 0x003C3A74
		public bool IsInReadyScreenShowView()
		{
			bool flag = !base.IsLoaded() || !base.IsVisible();
			return !flag && base.uiBehaviour.mDoScreenShot.IsVisible();
		}

		// Token: 0x04007109 RID: 28937
		private XScreenShotShareDocument _doc = null;

		// Token: 0x0400710A RID: 28938
		private int _share_count = 0;

		// Token: 0x0400710B RID: 28939
		private uint _dance_timer_token = 0U;

		// Token: 0x0400710C RID: 28940
		private uint _check_pic_token = 0U;

		// Token: 0x0400710D RID: 28941
		private XFx _playing_fx = null;

		// Token: 0x0400710E RID: 28942
		private float _max_dist = 9f;

		// Token: 0x0400710F RID: 28943
		private float _min_dist = 3f;

		// Token: 0x04007110 RID: 28944
		private HashSet<uint> _check_index = new HashSet<uint>();

		// Token: 0x04007111 RID: 28945
		private List<GameObject> _mode_go = new List<GameObject>();

		// Token: 0x04007112 RID: 28946
		private List<GameObject> _mode_effectgo = new List<GameObject>();

		// Token: 0x04007113 RID: 28947
		private string _saved_file_path = "";

		// Token: 0x04007114 RID: 28948
		private int _dance_num = 0;

		// Token: 0x04007115 RID: 28949
		private XFx fx;
	}
}
